from amqplib import client_0_8 as amqp
import sys
from redis import Redis
TAG = 'NUOQIU'
r = Redis()

conn = amqp.Connection(host="localhost:5672", userid="guest", password="guest", virtual_host="/", insist=False)
chan = conn.channel()

for i in range(0,15):
    story_list = r.get(TAG + ':' + str(i))
    for list in story_list:
#msg = amqp.Message(sys.argv[1])
#msg.properties["delivery_mode"] = 2
#chan.basic_publish(msg,exchange="sorting_room",routing_key="jason")
#
#chan.close()
#conn.close()